package com.ruoyi.cart.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 优惠券
对象 shop_coupon
 *

 * @date 2023-07-23
 */
public class Coupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 优惠券编号 */
    private Long couponId;

    /** 优惠券名称 */
    @Excel(name = "优惠券名称")
    private String name;

    /** 优惠券类型 */
    @Excel(name = "优惠券类型")
    private String type;

    /** 面额 */
    @Excel(name = "面额")
    private BigDecimal face;

    /** 折扣 */
    @Excel(name = "折扣")
    private Double discount;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 满额 */
    @Excel(name = "满额")
    private BigDecimal fullAmount;

    /** 有效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date effectiveTime;

    public void setCouponId(Long couponId)
    {
        this.couponId = couponId;
    }

    public Long getCouponId()
    {
        return couponId;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setType(String type)
    {
        this.type = type;
    }

    public String getType()
    {
        return type;
    }
    public void setFace(BigDecimal face)
    {
        this.face = face;
    }

    public BigDecimal getFace()
    {
        return face;
    }
    public void setDiscount(Double discount)
    {
        this.discount = discount;
    }

    public Double getDiscount()
    {
        return discount;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setFullAmount(BigDecimal fullAmount)
    {
        this.fullAmount = fullAmount;
    }

    public BigDecimal getFullAmount()
    {
        return fullAmount;
    }
    public void setEffectiveTime(Date effectiveTime)
    {
        this.effectiveTime = effectiveTime;
    }

    public Date getEffectiveTime()
    {
        return effectiveTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("couponId", getCouponId())
            .append("name", getName())
            .append("type", getType())
            .append("face", getFace())
            .append("discount", getDiscount())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("fullAmount", getFullAmount())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("effectiveTime", getEffectiveTime())
            .toString();
    }
}
